package ru.spies.loginOrRegistration;

import javax.servlet.http.HttpServletRequest;

import ru.spies.forms.LoginOrRegistrationForm;
import ru.spies.profileClasses.UserInfo;

public class ExitWork extends AbstractLoginOrRegistrationWork {

	private static ExitWork statThis;

	public ExitWork() {
		
	}
	
	public static ExitWork getInstance(){
		if (statThis==null){
			statThis = new ExitWork();
		}
		return statThis;
	}

	@Override
	protected String createForm(HttpServletRequest request) {
		UserInfo.getInstance().logout();
		return LoginOrRegistrationForm.getInstance().createSuccessfulForm();
	}

}
